<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>成员的查找规则</title>
</head>
<body>
<script>
  function Star (uname,uage) {
    this.uname = uname;
    this.uage = uage;
  }
  Star.prototype.sing = function () {
    console.log('我会唱歌');
  }
  /*最顶级的类 */
  Object.prototype.sex = '男';
  // Star.prototype.sex = '女';
  /* 原型链的查找规则 就近原则  */
  var ldh = new Star('刘德华',18);
  // ldh.sex = '男';
  console.log(ldh.sex);
</script>
</body>
</html>